import request from '@/utils/request'

// 查询园区出库单管理列表
export function listStore(query) {
  return request({
    url: '/park/outStore/list',
    method: 'get',
    params: query
  })
}

// 查询园区出库单管理详细
export function getStore(parkOutStoreCode) {
  return request({
    url: '/park/outStore/getInfo/' + parkOutStoreCode,
    method: 'get'
  })
}

// 新增园区出库单管理
export function addStore(data) {
  return request({
    url: '/park/outStore/add',
    method: 'post',
    data: data
  })
}

// 修改园区出库单管理
export function updateStore(data) {
  return request({
    url: '/park/outStore/edit',
    method: 'post',
    data: data
  })
}

// 删除园区出库单管理
export function delStore(parkOutStoreCode) {
  return request({
    url: '/park/outStore/remove/' + parkOutStoreCode,
    method: 'get'
  })
}

// 导出园区出库单管理
export function exportStore(query) {
  return request({
    url: '/park/outStore/export',
    method: 'get',
    params: query
  })
}

// 预览出库单---来自入库单
export function previewOutstore(entryOutStoryBillCode) {
  return request({
    url: '/park/outStore/preview/' + entryOutStoryBillCode,
    method: 'get'
  })
}

// 预览出库单---来自提货单
export function previewOutstoreFormPark(parkBillCode) {
  return request({
    url: '/park/outStore/previewByParkBillCode/' + parkBillCode,
    method: 'get'
  })
}

// 仓库列表
export function getStoreList(params) {
  return request({
    url: '/system/store/getStoreList',
    method: 'get',
    params
  })
}

// 仓库列表
export function getTotalPrice(params) {
  return request({
    url: '/park/outStore/computeStoragePay',
    method: 'post',
    data: params
  })
}

// 出库审核
export function confirmInStore(params) {
  return request({
    url: '/park/outStore/confirm',
    method: 'post',
    data: params
  })
}